import 'dart:convert';

import 'package:easy_read_comic/models/user_model.dart';

class AppModel {
  String? Token;

  UserModel? User;

  bool IsLoginState = false;

  bool IsReadTips = false;

  AppModel(
    this.IsLoginState, {
    this.Token,
    this.User,
    this.IsReadTips = false,
  });

  AppModel.fromJson(Map<String, dynamic> json)
      : Token = json["token"],
        User = UserModel.fromJson(json["user"]),
        IsReadTips = json["is_read_tips"];

  Map<String, dynamic> toJsonMap() => <String, dynamic>{
        "token": Token,
        "user": User,
        "is_read_tips": this.IsReadTips,
      };

  String toJsonString() => json.encode(this.toJsonMap());
}
